//
//  NEDConsoleHttpViewController.m
//  NEDBugConsole
//
//  Created by 98du on 2021/12/21.
//

#import "NEDConsoleHttpViewController.h"
//网络监控摘要
#import <DoraemonKit/DoraemonNetFlowSummaryViewController.h>
//网络监控列表
#import <DoraemonKit/DoraemonNetFlowListViewController.h>

@interface NEDConsoleHttpViewController ()

@end

@implementation NEDConsoleHttpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    // layout setting
    if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
        self.edgesForExtendedLayout = UIRectEdgeNone;
    }
    self.navigationItem.title = @"网络请求";
    UIBarButtonItem *clearItem = [[UIBarButtonItem alloc] initWithTitle:@"网络摘要" style:(UIBarButtonItemStyleDone) target:self action:@selector(summary)];
    self.navigationItem.rightBarButtonItem = clearItem;
    
    DoraemonNetFlowListViewController * netVC = [DoraemonNetFlowListViewController new];
    [self addChildViewController:netVC];
    [self.view addSubview:netVC.view];
    netVC.view.frame = self.view.bounds;
}


- (void)summary{
    [self.navigationController pushViewController:[DoraemonNetFlowSummaryViewController new] animated:YES];
}


@end
